package com.pureut.order.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pureut.order.domain.ProcurementPlan;
import com.pureut.order.dto.ProcurementPlanDto;
import com.pureut.order.vo.ProcurementPlanVo;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 采购计划mapper
 */
@Mapper
public interface ProcurementPlanMapper extends BaseMapperPlus<ProcurementPlanMapper, ProcurementPlan, ProcurementPlan> {

    /**
     * 采购计划列表
     */
    Page<Map<String,Object>> getprocurementPlanList(@Param("code") String code,@Param("page") Page<ProcurementPlanDto> page, @Param("procurementPlanVo") ProcurementPlanVo procurementPlanVo);

    /**
     * 根据id获取详情
     */
    Map<String,Object> getViewById(Long id);

    /**
     * 采购计划列表
     */
    List<ProcurementPlanDto> getProcurementPlanListByIds(@Param("idList") List<String> idList);

    /**
     * 批量新增
     * @param addMap
     * @return
     */
    boolean insertMessage(@Param("code") String code,@Param("addMap") Map<String, Object> addMap);

    /**
     * 销售计划修改
     * @param id
     * @param updateMap
     * @return
     */
    boolean updateProcurementPlan(@Param("id") Long id, @Param("updateMap") Map<String, Object> updateMap);
}
